package com.base.cn.platform.os.service.manage.work;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 工作台权限块排序接口
 * @author s.li
 * @create 2018-04-16-9:51
 */
@FeignClient(name = BaseService.appName,configuration = FeignAuthConfig.class)
public interface SysWorkBlockSortService extends BaseService {

    /**
     * 保存工作台权限模块
     * @param userId 用户ID
     * @param sysWorkBlockSortList 数据列表
     * @return  Map<String,Object>
     */
    @RequestMapping(contextPath + "/saveSysWorkBlockSort")
    Map<String,Object> saveSysWorkBlockSort(@RequestParam("userId") BigDecimal userId,
                                            @RequestBody List<Map<String, Object>> sysWorkBlockSortList);

    /**
     * 通过用户ID查询用户的工作台权限块排序
     * @param userId 用户ID
     * @return List<SysWorkBlockSort>
     */
    @RequestMapping(contextPath + "/findSysWorkBlockSortByUserId")
    List<Map<String,Object>> findSysWorkBlockSortByUserId(@RequestParam("userId") BigDecimal userId);
}
